var express = require("express");
var router = express.Router();
var path = require("path");

/* GET home page. */
router.get("/", function (req, res, next) {
    let passwd = req.query["passwd"];
    if (passwd == "123456")
        res.sendFile(path.join(__dirname, "../pages/home.html"));
    else {
        res.send("passwd error");
        console.error(passwd);
    }
    next();
});

router.use((req, res, next) => {
    console.log("a get require :logging.....");
    
});

module.exports = router;
